<extend name="Public/base" />

<block name="body">
	<!-- 标题栏 -->
	<div class="main-title">
		<h2>考勤记录</h2>
	</div>
	<div class="cf">
		<!--<button class="btn ajax-post" target-form="ids" url="{:U("Article/setStatus",array("status"=>1))}">启 用</button>-->



		<!-- 高级搜索 -->
		<div class="search-form fr cf">
			<div class="sleft">

				<input type="text" name="nickname" class="search-input" value="{:I('nickname')}" placeholder="请输入姓名">
				<a class="sch-btn search" href="javascript:;" id="search" url="{:U('Active/index')}"><i class="btn-search"></i></a>
			</div>
			<div class="btn-group-click adv-sch-pannel fl">
				<button class="btn">高 级<i class="btn-arrowdown"></i></button>
				<div class="dropdown cf">
					<div class="row">
						<label>更新时间：</label>
						<input type="text" id="time-start" name="time-start" class="text input-2x" value="" placeholder="起始时间" /> -
						<input type="text" id="time-end" name="time-end" class="text input-2x" value="" placeholder="结束时间" />
						<button class="btn sch-btn search" href="javascript:;" id="search1" url="{:U('Active/export_excel')}">导 出</button>
					</div>

				</div>
			</div>
		</div>
    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
	<table class="">
    <thead>
        <tr>
		<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
		<th class="">姓名</th>
		<!--<th class="">积分</th>-->
		<th class="">类型</th>
		<th class="">时间</th>
		<!--<th class="">状态</th>-->
		<!--<th class="">操作</th>-->
		</tr>
    </thead>
    <tbody>
		<volist name="_list" id="vo">
		<tr>
            <td><input class="ids" type="checkbox" name="id[]" value="{$vo.uid}" /></td>
			<td>{$vo.name}</td>
			<td><if condition="$vo.active_type eq 1">签到<else/>签退</if></td>
			<td><span>{$vo.active_time|time_format}</span></td>
		</tr>
		</volist>
	</tbody>
    </table> 
	</div>
    <div class="page">
        {$_page}
    </div>
</block>

<block name="script">
	<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
	<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
	<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
	<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
	<script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>

	<script type="text/javascript">
	//搜索功能
	$(".search").click(function(){
		var url = $(this).attr('url');
        var query  = $('.search-form').find('input').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
        query = query.replace(/^&/g,'');
        if( url.indexOf('?')>0 ){
            url += '&' + query;
        }else{
            url += '?' + query;
        }
		window.location.href = url;
	});
	//回车搜索
	$(".search-input").keyup(function(e){
		if(e.keyCode === 13){
			$("#search").click();
			return false;
		}
	});
    //导航高亮
    $('.side-sub-menu').find('a[href="{:U('User/index')}"]').closest('li').addClass('current');

	$('#time-start').datetimepicker({
		format: 'yyyy-mm-dd',
		language:"zh-CN",
		minView:2,
		autoclose:true
	});

	$('#time-end').datetimepicker({
		format: 'yyyy-mm-dd',
		language:"zh-CN",
		minView:2,
		autoclose:true
	});
	</script>
</block>
